LassoScript Utility
Basics Browse Detail

[PDF_Doc->SetColor]

Tag Link [PDF_Doc->SetColor] Category PDF
Type Member Source Available Yes
Support Preferred Version 6.0
Change Updated Data Source Any
Output Type None Security File
Implementation LJAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0

Description

[PDF_Doc->SetColor] sets the color and style for subsequent drawing operations. A required 'type' parameter specifies whether the drawing action is of type Stroke, Fill, or Both.

The color can be specified as a [PDF_Color] object or as a series of parameters.

If parameters are used then a 'color' parameter specifies a color type of Gray, RGB, or CMYK. If Gray is specified, a decimal value specifies a gray color value. If RGB is specified, three decimal values specifiy red, green and blue values, respectively. If CMYK is specified, four decimal values specifiy cyan, magenta, yellow, and black values, respectively. Color values are specified as decimals ranging from 0 to 1.0.

Note - The color (and line width) must be set before drawing occurs on each new page of the PDF.

Syntax

[$PDF_Doc->(SetColor: 'stroke', (PDF_Color: 'rgb', 1.0, 0.5, 0.0))]
[$PDF_Doc->(SetColor: 'fill', (PDF_Color: 'cmyk', 1.0, 0.5, 0.0, 0.5))]

[$PDF_Doc->(SetColor: 'stroke', 'Gray', Decimal)]
[$PDF_Doc->(SetColor: 'stroke', 'RGB', Decimal, Decimal, Decimalr)]
[$PDF_Doc->(SetColor: 'stroke', 'CMYK', Decimal, Decimal, Decimal, Decimal)]

Parameters

Required Parameters
Type Specifies the drawing action as Stroke, Fill, or Both.
Color Specifies a [PDF_Color] object or a string type of Gray, RGB, or CMYK.
Decimal(s) Specify color values of 0 to 1.0 for the selected color parameter.

Change Notes

The option to use the [PDF_Color] object was added in Lasso 8.5.5.

Examples

See the Lasso 8 Language Guide for examples of how to use this tag.

Related Tags

Category Tags

Substitution
[PDF_Barcode]
[PDF_Color]
[PDF_Font]
[PDF_Image]
[PDF_List]
[PDF_Read]
[PDF_Table]
[PDF_Text]
Process
[PDF_Serve]
Member
[PDF_Barcode->GenerateChecksum]
[PDF_Barcode->GetBarHeight]
[PDF_Barcode->GetBarMultiplier]
[PDF_Barcode->GetBarWidth]
[PDF_Barcode->GetBaseline]
[PDF_Barcode->GetCode]
[PDF_Barcode->GetFont]
[PDF_Barcode->GetSize]
[PDF_Barcode->GetTextAlignment]
[PDF_Barcode->GetTextSize]
[PDF_Barcode->GetType]
[PDF_Barcode->SetBarHeight]
[PDF_Barcode->SetBarMultiplier]
[PDF_Barcode->SetBarWidth]
[PDF_Barcode->SetBaseline]
[PDF_Barcode->SetCode]
[PDF_Barcode->SetFont]
[PDF_Barcode->SetGenerateChecksum]
[PDF_Barcode->SetShowChecksum]
[PDF_Barcode->SetTextAlignment]
[PDF_Barcode->SetTextSize]
[PDF_Barcode->ShowChecksum]
[PDF_Barcode->ShowCode39StartStop]
[PDF_Barcode->ShowEANGuardBars]
[PDF_Font->GetColor]
[PDF_Font->GetEncoding]
[PDF_Font->GetFace]
[PDF_Font->GetFullFontName]
[PDF_Font->GetPSFontName]
[PDF_Font->GetSize]
[PDF_Font->GetSupportedEncodings]
[PDF_Font->IsTrueType]
[PDF_Font->SetColor]
[PDF_Font->SetEncoding]
[PDF_Font->SetFace]
[PDF_Font->SetSize]
[PDF_Font->SetUnderline]
[PDF_Font->TextWidth]
[PDF_List->Add]
[PDF_Read->AddJavaScript]
[PDF_Read->ExportFDF]
[PDF_Read->FieldNames]
[PDF_Read->FieldType]
[PDF_Read->FieldValue]
[PDF_Read->GetHeaders]
[PDF_Read->ImportFDF]
[PDF_Read->JavaScript]
[PDF_Read->PageCount]
[PDF_Read->PageSize]
[PDF_Read->Save]
[PDF_Read->SetFieldValue]
[PDF_Read->SetPageRange]
[PDF_Table->Add]
[PDF_Table->GetAbsWidth]
[PDF_Table->GetAlignment]
[PDF_Table->GetBorderColor]
[PDF_Table->GetBorderWidth]
[PDF_Table->GetColumnCount]
[PDF_Table->GetPadding]
[PDF_Table->GetRowCount]
[PDF_Table->GetSpacing]
[PDF_Table->Insert]
[PDF_Table->Remove]
[PDF_Table->SetAlignment]
[PDF_Table->SetBorderColor]
[PDF_Table->SetBorderWidth]
[PDF_Table->SetPadding]
[PDF_Table->SetSpacing]
[PDF_Text->Add]